package org.ic.crypto;

public class CardBuilder {

	public static void main(String[] args) {
		long cardIds = 8880888800000000L;
		String send = "abcdef898989";
		printCardIdAndCryptCard(send,cardIds,1,150);
	}

	public static final void printCardIdAndCryptCard(String seed, long startId,
			long sscending, int count) {
		long cardIds = startId;
		StringBuffer tmp = new StringBuffer();
		for (int i = 0; i <= count; i++) {
			String encrypt;
			try {
				encrypt = DesEcbUtil.encode(seed, String.valueOf(cardIds));
				String base = Base64.encode(encrypt.getBytes());
				tmp.append(cardIds).append(":").append(base).append("\n");
			} catch (Exception e) {
				e.printStackTrace();
			}
			cardIds=cardIds+sscending;
		}
		System.out.println(tmp.toString());
	}

}
